﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using QWeiBoN.ViewModule;

namespace QWeiBoN
{
    public partial class CommentsViewUserControl : UserControl
    {
        private WeiboCommentsModel wcModel = new WeiboCommentsModel();
        private string rootId = string.Empty;

        public CommentsViewUserControl(string rootId)
        {
            InitializeComponent();
            CommentsList.DataContext = wcModel;
            this.rootId = rootId;
        }

        public Boolean loadMesage()
        {
            wcModel.clearHistory();
            Boolean returnr = false;
            //wcModel.getCommentList(rootId, (callBack) =>
            //{
            //    returnr = true;
            //});
            return returnr;
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.CloseMeAsPopup();
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.CloseMeAsPopup();
        }
    }
}
